/*
 * @Description: 读取文件,promise
 * @Author: dh
 * @Date: 2021-09-02 16:51:50
 * @LastEditors: dh
 * @LastEditTime: 2023-10-24 09:57:25
 */
const fs = require('node:fs/promises')
const path = require('node:path')

fs.readFile(path.join(__dirname, './test.txt'), 'utf-8')
	.then(data => {
		console.log(data)
	})
	.catch(err => {
		console.log(err)
	})
